package com.heima.apis.behavior;



import com.heima.model.behavior.dtos.BhLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import com.heima.model.behavior.dtos.ReadCountDto;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author yht
 * @date 2022/1/15 10:44
 */

@FeignClient("leadnews-behavior")
public interface IBehaviorClient {

    /**
     * 不喜欢
     * @return
     */
    @RequestMapping("/api/v1/un_likes_behavior")
    public ResponseResult unLikes(@RequestBody UnLikesBehaviorDto dto);


    /**
     * 查询是否不喜欢
     * @param map
     * @return 里面是true或者false
     */
    @RequestMapping("/api/v1/findIsUnLike")
    public ResponseResult findIsUnLike(@RequestBody Map map);

    /**
     * 用户阅读
     * @return
     */
    @RequestMapping("/api/v1/readcount")
    public ResponseResult readCount(@RequestBody ReadCountDto dto);
     /* 点赞
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/like_behavior")
    public ResponseResult liking (BhLikesBehaviorDto dto);

    /**
     * 查询是否点赞
     * @param map
     * @return
     */
    @PostMapping("/api/v1/findIsLike")
    public ResponseResult findLike (@RequestBody Map map);

}
